package com.cll.learn.cas.demo1;

/**
 * 描述信息:
 *
 * @author CLL
 * @version 1.0
 * @date 2021/5/15 10:57
 */
public class AtomicTest {

    public static void main(String[] args) throws InterruptedException {
        User user = new User(18);
        for (int i = 0; i < 3; i++) {
            new Thread(new RechargeThread(user)).start();
        }

        for (int i = 0; i < 100; i++) {
            new Thread(new ConsumeThread(user)).start();
        }


        Thread.sleep(60000);
    }
}
